home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Almathera Ten Pack 3: CDPD 3
/
Almathera Ten on Ten - Disc 3: CDPD3.iso
/
fish
/
726-750
/
734
/
powervisor
/
s
/
pv
/
searchkeyword.pv
< prev
next >
Wrap
Text File
|
1995-03-18
|
4KB
|
118 lines
/*========================================================================
Use this ARexx script to search for a string in the PowerVisor hypertext
manual. This script is automatically called with the 'index' alias defined
in s:PowerVisor-startup. After typing 'index' PowerVisor will ask for
the string to search. After waiting a bit you will get a numbered list
with all topics where the string was found. Choose the right number to
go to that topic. Simply press enter to quit. This script will start
AmigaGuide to go to that topic. If you don't have AmigaGuide this script
is useles unless you change it.
This script uses the 'searchit' utility in the 'pv:docs' subdirectory.
This utility searches a topic. There are two versions: 'searchit.gcc'
(compiled with the Gnu C compiler) and 'searchit.lc' (compiled with
the SAS/C 5.10 compiler). The gcc version is a lot faster, but it needs
the 'ixemul.library' (available from FTP). Copy the version you want
over 'searchit' (default is 'lc' version because this will always run).
© Jorrit Tyberghein 16 Jul 1992 V1.0
========================================================================*/
options results
ti=pragma('Id')
'unhide'
'print "Give string : "'
'scan'
str=result
'print "'str'\0a"'
if str=='' then exit
address command 'pv:docs/searchit pv:docs/PowerVisor.guide "'str'" >t:tmp'ti
address command 'pv:docs/searchit pv:docs/GettingStarted.guide "'str'" >>t:tmp'ti
address command 'pv:docs/searchit pv:docs/Expressions.guide "'str'" >>t:tmp'ti
address command 'pv:docs/searchit pv:docs/Screen.guide "'str'" >>t:tmp'ti
address command 'pv:docs/searchit pv:docs/InstallingPV.guide "'str'" >>t:tmp'ti
address command 'pv:docs/searchit pv:docs/LookingAtThings.guide "'str'" >>t:tmp'ti
address command 'pv:docs/searchit pv:docs/Debug.guide "'str'" >>t:tmp'ti
address command 'pv:docs/searchit pv:docs/Scripts.guide "'str'" >>t:tmp'ti
address command 'pv:docs/searchit pv:docs/CommandRef.guide "'str'" >>t:tmp'ti
address command 'pv:docs/searchit pv:docs/Functions.guide "'str'" >>t:tmp'ti
address command 'pv:docs/searchit pv:docs/Aliases.guide "'str'" >>t:tmp'ti
address command 'pv:docs/searchit pv:docs/Lists.guide "'str'" >>t:tmp'ti
address command 'pv:docs/searchit pv:docs/TechnicalInfo.guide "'str'" >>t:tmp'ti
address command 'pv:docs/searchit pv:docs/Glossary.guide "'str'" >>t:tmp'ti
address command 'pv:docs/searchit pv:docs/TheWizCorner.guide "'str'" >>t:tmp'ti
if ~open(file,'t:tmp'ti,'R') then
do
address command 'delete t:tmp'ti' >nil:'
'print "Error opening file !\0a"'
exit
end
line=readln(file)
oldtitle=""
i=1
do while ~eof(file)
parse var line ': @Node 'nodename' "'titlename'"'
if oldtitle~=titlename then
do
'print "'i' : ·Å'titlename'Å\0a"'
titles.i=titlename
node.i=nodename
i=i+1
end
oldtitle=titlename
line=readln(file)
end
'print "Give number : "'
'scan'
which=result
'print "'which'\0a"'
do while datatype(which)==NUM
if pos(' : ',titles.which)==0 then
parse var titles.which fn' ('
else parse var titles.which fn' :'
upper fn
select
when fn=='GETTING STARTED' then fn='GettingStarted'
when fn=='EXPRESSIONS' then fn='Expressions'
when fn=='SCREENS AND WINDOWS' then fn='Screen'
when fn=='INSTALLING POWERVISOR' then fn='InstallingPV'
when fn=='LOOKING AT THINGS' then fn='LookingAtThings'
when fn=='DEBUGGING' then fn='Debug'
when fn=='SCRIPTS' then fn='Scripts'
when fn=='COMMAND REFERENCE' then fn='CommandRef'
when fn=='FUNCTION REFERENCE' then fn='Functions'
when fn=='ALIAS REFERENCE' then fn='Aliases'
when fn=='LIST REFERENCE' then fn='Lists'
when fn=='TECHNICAL INFORMATION' then fn='TechnicalInfo'
when fn=='GLOSSARY' then fn='Glossary'
when fn=='THE WIZARD CORNER' then fn='TheWizCorner'
otherwise
do
'print "Error!\0a"'
fn='Error'
end
end
if fn~='Error' then
do
node=strip(node.which,'B','"')
address command 'amigaguide pv:docs/'fn'.guide doc="'node'" screen=PowerVisorScreen'
end
'print "Give number : "'
'scan'
which=result
'print "'which'\0a"'
end
call close file
address command 'delete t:tmp'ti' >nil:'
exit